package com.acme.bankapp;

import com.acme.bankapp.domain.bank.Bank;
import com.acme.bankapp.service.bank.BankLoader;
import com.acme.bankapp.service.bank.network.BankServer;

/**
 * This class represents Bank (Server) Application
 *
 * @author Alexander Kotov (kotov.alex.22@gmail.com)
 */
public class BankTestApplication {
    private final static String DESERIALIZE_FILE_NAME = "lab15/src/test/resources/deser.bin";

    /**
     * This method starts bank server
     */
    public static void main(String[] args) {
        BankServer bankServer = null;
        try {
            bankServer = new BankServer(new BankLoader(DESERIALIZE_FILE_NAME));
            //bankServer = new BankServer(new Bank());
        } catch (Exception e) {
            System.out.println(e.getMessage());
        }

        bankServer.start();
    }
}
